load("@fbsource//tools/build_defs:rust_library.bzl", "rust_library")

oncall("sapling")

rust_library(
    name = "clidispatch",
    srcs = glob(["src/**/*.rs"]),
    autocargo = {"cargo_toml_config": {
        "dependencies_override": {"dependencies": {
            "sapling-indexedlog": {"features": ["configurable"]},
            "sapling-repo": {"features": ["wdir"]},
            "sapling-thrift-types": {"optional": True},
        }},
        "features": {
            "eden": [
                "sapling-workingcopy/eden",
                "sapling-thrift-types",
            ],
            "sl_oss": ["sapling-identity/sl_oss"],
        },
        "lib": {"name": "clidispatch"},
        "package": {
            "authors": ["Meta Source Control Team <sourcecontrol-dev@meta.com>"],
            "homepage": "https://sapling-scm.com/",
            "license": "MIT",
            "name": "sapling-clidispatch",
            "repository": "https://github.com/facebook/sapling",
        },
    }},
    features = [
        "eden",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:erased-serde",
        "fbsource//third-party/rust:thiserror",
        "fbsource//third-party/rust:tracing",
        "//common/rust/shed/hostname:hostname",
        "//eden/scm/lib/blackbox:blackbox",
        "//eden/scm/lib/cliparser:cliparser",
        "//eden/scm/lib/config/loader:configloader",
        "//eden/scm/lib/config/model:configmodel",
        "//eden/scm/lib/context:context",
        "//eden/scm/lib/doctor/network:network-doctor",
        "//eden/scm/lib/gitcompat:gitcompat",
        "//eden/scm/lib/hgtime:hgtime",
        "//eden/scm/lib/hook:hook",
        "//eden/scm/lib/identity:identity",
        "//eden/scm/lib/indexedlog:indexedlog",
        "//eden/scm/lib/io:io",
        "//eden/scm/lib/io/term/logger:termlogger",
        "//eden/scm/lib/repo:repo",
        "//eden/scm/lib/sampling:sampling",
        "//eden/scm/lib/thrift-types:thrift-types",
        "//eden/scm/lib/types:types",
        "//eden/scm/lib/util:util",
        "//eden/scm/lib/util/hgplain:hgplain",
        "//eden/scm/lib/workingcopy:workingcopy",
    ],
)
